<template>
  <div>
    <p>用户名<input type="text" v-model="form.username"></p>
    <p>密码<input type="text" v-model="form.password"></p>
    <button @click="add">添加</button>
  </div>
</template>

<script>
export default {
  name: "teacher",
  data() {
    return {
      form: {}
    }
  },

  methods: {
    add() {
      this.axios.post('teacher/', this.form).then(res => {
        this.$router.push('/login')
      })
    }
  },

  mounted() {

  }
}
</script>

<style scoped>

</style>
